package com.ss.android.article.base.feature.detail2.picgroup;

import android.view.MotionEvent;
import com.bytedance.common.utility.UIUtils;
import com.ss.android.article.base.feature.detail2.picgroup.a.a;
import com.ss.android.article.base.ui.SwipeBackLayout.b;

final class w implements b {
    private final GalleryFragment b;
    public final a a;

    w(GalleryFragment arg1, com.ss.android.article.base.feature.detail2.picgroup.a.a arg2) {
        this.b = arg1;
        this.a = arg2;

    }

    public final void a(int arg3, int arg4) {
        this.a.mListView.setTranslationY(((float)0));
        this.a.d.setTranslationY(((float)0));
    }

    public final boolean a(MotionEvent arg3, int arg4) {
        boolean v0;
        if(arg4 != 0) {
            if(arg4 == 2 && !this.a.mListView.canScrollVertically(-1)) {
                return true;
            }

            v0 = false;
        } else {
            v0 = true;
        }

        return v0;
    }

    public final void b(int arg7, int arg8) {
        long v4 = 200;
        if((((float)arg7)) < UIUtils.dp2px(this.b.o, 30f)) {
            this.a.mListView.animate().setDuration(v4).translationY(0f);
            this.a.d.animate().setDuration(v4).translationY(0f);
        }
        else {
            this.a.mSwipeBackLayout.animate().setDuration(v4).translationY(((float)this.a.mSwipeBackLayout.getHeight())).setListener(new x(this));
        }
    }
}

